<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<script
	src="${pageContext.request.contextPath}/resources/js/Login/Login.js"></script>

<div class="row-fluid">
	<div class="span12 center login-header">
		<h2>Login</h2>
	</div>
	<!--/span-->
</div>
<!--/row-->

<div class="well span5 center login-box">
	<c:if test="${not empty result}">
		<div class="alert alert-info alert-login">
			<spring:hasBindErrors htmlEscape="true" name="loginDTO">
				<c:if test="${errors.errorCount gt 0}">
					<c:forEach items="${errors.allErrors}" var="error">
						<spring:message code="${error.code}"
							arguments="${error.arguments}" text="${error.defaultMessage}" />
						<br />
					</c:forEach>
				</c:if>
			</spring:hasBindErrors>
		</div>
	</c:if>
	<form:form id="login_form" method="POST" class="form-horizontal"
		commandName="loginDTO" action="login">
		<fieldset>
			<div class="input-prepend" title="Username" data-rel="tooltip">
				<span class="add-on"><i class="icon-user"></i></span>
				<form:input class="input-large span10" path="email" id="email"
					name="email" placeholder="Email" value="" maxlength="100" />
			</div>
			<div class="clearfix"></div>

			<div class="input-prepend" title="Password" data-rel="tooltip">
				<span class="add-on"><i class="icon-lock"></i></span>
				<form:password class="input-large span10" path="password"
					name="password" maxlength="100" placeholder="Password" />
			</div>
			<div class="clearfix"></div>

			<p class="center span5">
				<button type="submit" class="btn btn-primary">Login</button>
				<span class="link_reg"><a href="register">Not registered?
						Sign up here</a></span>
			</p>
		</fieldset>
	</form:form>
</div>
